import router from '@system.router';
export default {
    data:{
//        beginTime:"9:00",
        bHour:'9',
        bMin:'0',
        eHour:'10',
        eMin:'0',

        repeatDay:"",

        Mon:"周一",
        Tue:"周二",
        Wed:"周三",
        Thu:"周四",
        Fri:"周五",
        Sat:"周六",
        Sun:"周日",
//        arr:[],
    },
    computed:{
        beginTime(){
            if(this.bMin<='9'){
                return this.bHour+':0'+this.bMin;
            }
            else{
                return this.bHour+':'+this.bMin;
            }
        },
        endTime(){
            if(this.eMin<='9'){
                return this.eHour+':0'+this.eMin;
            }
            else{
                return this.eHour+':'+this.eMin;
            }
        },
/*        repeatDay(){

            return this.arr.split(" ");
        }*/
    },
    exitClick(){
        this.$element('cha-dialog').show();
    },
    saveClick(){
        router.back();
    },
    noClick(){
        this.$element('cha-dialog').close();
    },
    yesClick(){
        this.$element('cha-dialog').close();
        router.back();
    },
    beginChange(e){
        this.bHour=e.hour;
        this.bMin=e.minute;
    },
    endChange(e){
        this.eHour=e.hour;
        this.eMin=e.minute;
    },
    repeatClick(){
        this.$element('re-dialog').show();
    },
    cancelClick(){
        this.$element('re-dialog').close();
    },
    confirmClick(){
/*        if(this.$element('Mon').checked){
            this.repeatDay+="周一 ";
        }*/

        this.$element('re-dialog').close();
    },
    checkboxChange(str,e){
        if(e.checked){
            this.repeatDay+=str+" ";
//            console.info("-------------"+str);
//            this.arr.push(str+" ");
            console.info(str);
        }
    }

}